package com.isoft.demooa.dao.salary;

import com.isoft.demooa.entity.salary.NormalSalary;
import org.apache.ibatis.annotations.One;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.mapping.FetchType;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface NormalSalaryMapper {

    @Select("select * from tb_employeesalary")
    @Results(value = {
            @Result(column = "id",property = "id"),
            @Result(column = "employeeid",one = @One(select = "com.isoft.demooa.dao.employee.NormalMapper.selectById"
                   , fetchType = FetchType.LAZY),property = "employee")
    })
    List<NormalSalary> selectAll();
}
